﻿<UserControl x:Class="CorpAbreu.Login.Views.Login"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             xmlns:xc="clr-namespace:CorpAbreu.Login.ViewModels"
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid Width="300" Height="300">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="25" />
            <RowDefinition Height="25"/>
            <RowDefinition Height="25"/>
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Label Content="Corp Abreu Login" FontSize="28" Grid.ColumnSpan="2" Margin="0" HorizontalAlignment="Center"></Label>
        <Label Grid.Column="0" Grid.Row="1">Utilizador</Label>
        <TextBox Grid.Column="1"
         Grid.Row="1" Margin="1,1,10,1" BorderBrush="Black"
         ToolTip="Escreva o seu utilizador"
         Name="txtUserName" Text="{Binding UserName}" />

        <Label Grid.Column="0"
       Grid.Row="2">Password</Label>
        <PasswordBox Grid.Column="1" BorderBrush="Black"
             Grid.Row="2" Margin="1,1,10,1"
             ToolTip="Escreva a sua password"
             Name="txtPassword" xc:PasswordHelper.Attach="True" 
         xc:PasswordHelper.Password="{Binding Text, ElementName=plain, Mode=TwoWay}" />

        <TextBlock Text="{Binding Mensagem}" Grid.Row="3" Grid.ColumnSpan="2"></TextBlock>

        <StackPanel  Grid.ColumnSpan="2"
            Grid.Row="4"
            Margin="0,40,0,0"
            HorizontalAlignment="Right"
            Orientation="Horizontal">
            <Button Name="btnCancel" IsCancel="True" MinWidth="80" Margin="10,0,10,10"
          Content="Cancelar">
            </Button>
            <Button Name="btnLogin" Margin="0,0,5,10"
          IsDefault="True" MinWidth="80"
          Content="Login"
          Command="{Binding Valida}" ></Button>
        </StackPanel>
    </Grid>

</UserControl>
